<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>图书管理系统</title>

    <link rel="stylesheet" href="/mybook/css/style.css" type="text/css" />
    <script type="text/javascript" src="/mybook/js/jquery-3.6.0.min.js" ></script>
    <script type="text/javascript" src="/mybook/js/template-web.js" ></script>  <!--art模板-->
    <script type="text/javascript" src="/mybook/js/layer/layer.js" ></script>
    <script type="text/javascript" src="/mybook/js/index.js" ></script>

    <script type="text/template" id="indexTpl">
        {{each list}}
        <tr>
            <td>{{$value.id}}</td>
            <td>{{$value.name}}</td>
            <td>{{$value.author}}</td>
            <td>{{$value.category}}</td>
            <td>{{$value.description}}</td>
            <td>
                <a href="javascript:void(0)">修改</a>
                &nbsp;|&nbsp;
                <a href="javascript:void(0)">删除</a>
            </td>
        </tr>
        {{/each}}

    </script>

    <script type="text/template" id="formTpl">
        <form class="form">
            <input type="hidden" name="id" value="{{id}}">
            名称: <input autocomplete="off" type="text" name="name" value="{{name}}"><br>
            作者: <input autocomplete="off" type="text" name="author" value="{{author}}"><br>
            分类: <input autocomplete="off" type="text" name="category" value="{{category}}"><br>
            描述: <input autocomplete="off" type="text" name="description" value="{{description}}"><br>
            <input type="button" value="提交">
        </form>
    </script>

</head>
<body>
    <div class="title">
        图书管理系统
        <a href="javascript:void(0)" id="addBookAId">添加图书</a>
    </div>

    <div class="content">
        <table cellpadding="0" cellspacing="0">
            <thead>
            <tr>
                <th>编号</th>
                <th>名称</th>
                <th>作者</th>
                <th>类型</th>
                <th>描述</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody id="dataList">

            </tbody>
        </table>
    </div>
</body>
</html>